home *** CD-ROM | disk | FTP | other *** search
/ FM Towns: Free Software Collection 9 / FM Towns Free Software Collection 9.iso / taropyon / silib / inc / sidlg.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-16  |  2.7 KB  |  86 lines

  1. /*************************************************************************
  2. *    "sidlg.h"
  3. *-------------------------------------------------------------------------
  4. *    Dialog library
  5. *                                            Copyright (c) 1993, TaroPYON
  6. *************************************************************************/
  7.  
  8. #ifndef    _SIDLG_H
  9. #define    _SIDLG_H
  10.  
  11. #ifndef    _SIEV_H
  12. #    include    <siev.h>
  13. #endif
  14. #ifndef    _SISCN_H
  15. #    include    <siscn.h>
  16. #endif
  17. #ifndef    _SIWIN_H
  18. #    include    <siwin.h>
  19. #endif
  20.  
  21. typedef struct _sidlg_t    /* ダイアログ構造体    */
  22. {
  23.     struct _sidlg_t    *prev, *next;
  24.  
  25.     unsigned int    att;            /* 属性                    */
  26.     unsigned int    stt;            /* ステータス            */
  27.  
  28.     RECTANGLE_T        rect;            /* システムフレーム        */
  29.     FRAME_T            fr;                /* ユーザーフレーム        */
  30.     WIN_T            *win;            /* ウィンドゥ用ワーク    */
  31.     EV_T            *ev;            /* イベント用ワーク        */
  32.  
  33.     struct                            /* マウスカーソル指定    */
  34.     {
  35.         int            md;                /* モード                */
  36.         POINT_T        newPos;            /* マウスカーソルの位置    */
  37.  
  38.         int            posFlag;
  39.         POINT_T        pos;
  40.         POINT_T        posDlg;            /* ダイアログの表示位置    */
  41.  
  42.         int            movFlag;
  43.         FRAME_T        frMove;            /* 移動範囲                */
  44.         void        *work;            /* ワーク用                */
  45.     } pd;
  46.  
  47.     int                typ;            /* ダイアログタイプ        */
  48.     void            *dlgPara;        /* ダイアログパラメータ    */
  49.     int                (*dlgFunc)(struct _sidlg_t *);
  50.                                     /* システム表示関数        */
  51.  
  52.     int                (*dspFunc)(struct _sidlg_t *);
  53.                                     /* ユーザー描画関数        */
  54.     void            *ptr;
  55. } DLG_T;
  56.  
  57. /*----------------------------------------------------------------------*/
  58. #define    DLGPD_POS_OFF    (0x0000_0000)    /* 何もしない        */
  59. #define    DLGPD_POS_USR    (0x0000_0001)    /* ユーザー指定        */
  60. #define    DLGPD_MOV_IN    (0x0001_0000)    /* 移動範囲の制限    */
  61.  
  62. /*----------------------------------------------------------------------*/
  63. #define    DLGTYP_NOTHING    (0x0000)        /* 何もしない        */
  64. #define    DLGTYP_STD1        (0x0001)        /* 標準1            */
  65. #define    DLGTYP_STD2        (0x0002)        /* 標準2            */
  66. #define    DLGTYP_LST1        (0x0101)        /* リスト表示タイプ    */
  67.  
  68. /*----------------------------------------------------------------------*/
  69. #define    DLGPOS_NORMAL            (0)
  70. #define    DLGPOS_CENTER_OF_SCREEN    (1)    /* 画面中央                */
  71. #define    DLGPOS_MOSCUR            (8)    /* マウスカーソル位置に    */
  72.  
  73. /*----------------------------------------------------------------------*/
  74. extern DLG_T       *DLG_open( int (*dspFunc)(DLG_T *), void *ptr );
  75. extern int            DLG_dsp( DLG_T *dlg );
  76. extern int            DLG_off( DLG_T *dlg );
  77. extern void            DLG_close( DLG_T *dlg );
  78. extern int            DLG_setSize( DLG_T *dlg, int xs, int ys );
  79. extern int            DLG_setPosition( DLG_T *dlg, int md, ... );
  80. extern int            DLG_move( DLG_T *dlg, int newX, int newY );
  81. extern int            dlg_moveSrv( DLG_T *dlg, int *newX, int *newY );
  82. extern int            DlgMoveEvFunc( int evNo, EVDAT_T *evdat );
  83. /*----------------------------------------------------------------------*/
  84.  
  85. #endif
  86.